Intersoft ClientUI Documentation
How-to: Navigate to a Page in External ApplicationPackage with Shell Integration

This example shows how to navigate to a UXPage that located in an external ApplicationPackage which is managed by application framework through UXShell.

Example

Description

The ClientUI Navigation Framework features an advanced integration to the application framework which allows you to navigate to an external page using the same semantics and mechanism as you navigate to a local page.

You can create user-friendly URI that maps to an external application package by simply defining the URI of the target application package in the MappedUri property. This enables you to design a composite application that allows users to navigate to both local and external page in consistent and intuitive manner.

To design a scalable composite navigation application, it is recommended that you use the navigation approach that take advantage of the application framework, such as integration with UXShell.

One of the benefits of using ClientUI application framework and shell integration is that it supports comprehensive application lifetime management. For example, when you navigate to an external application package that was previously downloaded, the navigation service is aware about the package state through the application framework, thus skipping the unnecessary download process and load the content immediately.

To learn how to navigate to an external package based on the target URI, see How-to: Navigate to a Page in External ApplicationPackage with Direct URI.

Code

XAML
Copy Code
<Intersoft:UXFrame UseGlobalShell="true">
    <Intersoft:UXFrame.UriMapper>
        <Intersoft:UriMapper>
            <Intersoft:UriMapping Uri="/Home" MappedUri="/Views/Home.xaml"/>
            <Intersoft:UriMapping Uri="/{page}" MappedUri="/Views/{page}.xaml"/>
            <Intersoft:UriMapping Uri="/App1" MappedUri="/ExternalClientUIApp1"/>
        </Intersoft:UriMapper>
    </Intersoft:UXFrame.UriMapper>
</Intersoft:UXFrame>

The above example presumes that a ExternalClientUIApp1.xap file existed in the ClientBin of the Web project, which should be the same folder where the root application existed.

In the above example, navigating to an ApplicationPackage named "ExternalClientUIApp1" can be done by simply specifying the application name into the MappedUri property of the UriMapping instance. The exact MappedUri format for navigation in the integrated mode is /{name} where the name refers to the Name property of the particular application package.

You can initiate page navigation from controls that implement INavigationSource such as UXButton, UXNavigationButton, UXMenuItem and more. For more information, see Navigation Sources Overview.

The following sample shows how to perform page navigation using UXButton.

XAML
Copy Code
<Intersoft:UXButton Content="Navigate to App1" NavigateUri="/App1" />

To create a new ClientUI Application, you use the ClientUI project templates installed in Visual Studio 2010. For more information, see Introduction to ClientUI Project Templates.

See Also

Concepts

Other Resources